{include file="common/head" /}
<div class="max-w-7xl mx-auto">
  <div class="bg-white rounded-lg shadow-lg p-6">
    <h3 class="text-2xl font-bold text-gray-800 mb-6">
      <i class="fa fa-list text-primary mr-2"></i> 我的计时报工记录
    </h3>
    <div class="overflow-x-auto">
      <table class="min-w-full divide-y divide-gray-200">
        <thead class="bg-gray-50">
          <tr>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">分工ID</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">工作日期</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">开始时间</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">结束时间</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">工时</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">工资(元)</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th>
            <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">备注</th>
          </tr>
        </thead>
        <tbody class="bg-white divide-y divide-gray-200">
          {volist name="records" id="item"}
          <tr class="hover:bg-gray-50">
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.tallocationtime_id}</td>
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.work_date}</td>
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.start_time}</td>
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.end_time}</td>
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.total_hours}</td>
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.wage}</td>
            <td class="px-6 py-4 whitespace-nowrap">{if $item.status==0}<span class="inline-flex px-2 py-1 text-xs font-semibold rounded-full bg-yellow-100 text-yellow-800">待确认</span>{else/}<span class="inline-flex px-2 py-1 text-xs font-semibold rounded-full bg-green-100 text-green-800">已确认</span>{/if}</td>
            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">{$item.remark}</td>
          </tr>
          {/volist}
        </tbody>
      </table>
    </div>
    {if condition="empty($records)"}
    <div class="text-center py-12">
      <i class="fa fa-inbox fa-3x text-gray-300 mb-4"></i>
      <p class="text-gray-500">暂无报工记录</p>
    </div>
    {/if}
  </div>
</div>
{include file="common/footer" /} 